﻿Imports Microsoft.VisualBasic.CompilerServices
Imports System
Imports System.ComponentModel
Imports System.Diagnostics
Imports System.Drawing
Imports System.Runtime.CompilerServices
Imports System.Windows.Forms

Namespace Stickam_Client
    <DesignerGenerated> _
    Public Class Form_Webpage
        Inherits Form
        ' Methods
        <DebuggerNonUserCode> _
        Public Sub New()
            AddHandler MyBase.Load, New EventHandler(AddressOf Me.Form_Webpage_Load)
            AddHandler MyBase.FormClosing, New FormClosingEventHandler(AddressOf Me.Form_Webpage_FormClosing)
            Me.InitializeComponent
        End Sub

        Private Sub Browser_DocumentCompleted(ByVal sender As Object, ByVal e As WebBrowserDocumentCompletedEventArgs)
            Me.Loaded = True
        End Sub

        <DebuggerNonUserCode> _
        Protected Overrides Sub Dispose(ByVal disposing As Boolean)
            Try 
                If (disposing AndAlso (Not Me.components Is Nothing)) Then
                    Me.components.Dispose
                End If
            Finally
                MyBase.Dispose(disposing)
            End Try
        End Sub

        Private Sub Form_Webpage_FormClosing(ByVal sender As Object, ByVal e As FormClosingEventArgs)
            Me.Loaded = False
        End Sub

        Private Sub Form_Webpage_Load(ByVal sender As Object, ByVal e As EventArgs)
            Me.Browser.Navigate((Environment.CurrentDirectory & "\webpage\index.html"))
        End Sub

        <DebuggerStepThrough> _
        Private Sub InitializeComponent()
            Me.Browser = New WebBrowser
            Me.SuspendLayout
            Me.Browser.Dock = DockStyle.Fill
            Dim point As New Point(0, 0)
            Me.Browser.Location = point
            Dim size As New Size(20, 20)
            Me.Browser.MinimumSize = size
            Me.Browser.Name = "Browser"
            size = New Size(&H19E, &H128)
            Me.Browser.Size = size
            Me.Browser.TabIndex = 0
            Dim ef As New SizeF(6!, 13!)
            Me.AutoScaleDimensions = ef
            Me.AutoScaleMode = AutoScaleMode.Font
            size = New Size(&H19E, &H128)
            Me.ClientSize = size
            Me.Controls.Add(Me.Browser)
            Me.FormBorderStyle = FormBorderStyle.FixedToolWindow
            Me.Name = "Form_Webpage"
            Me.Text = "Webpage"
            Me.ResumeLayout(False)
        End Sub


        ' Properties
        Friend Overridable Property Browser As WebBrowser
            <DebuggerNonUserCode> _
            Get
                Return Me._Browser
            End Get
            <MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode> _
            Set(ByVal WithEventsValue As WebBrowser)
                Dim handler As WebBrowserDocumentCompletedEventHandler = New WebBrowserDocumentCompletedEventHandler(AddressOf Me.Browser_DocumentCompleted)
                If (Not Me._Browser Is Nothing) Then
                    RemoveHandler Me._Browser.DocumentCompleted, handler
                End If
                Me._Browser = WithEventsValue
                If (Not Me._Browser Is Nothing) Then
                    AddHandler Me._Browser.DocumentCompleted, handler
                End If
            End Set
        End Property


        ' Fields
        <AccessedThroughProperty("Browser")> _
        Private _Browser As WebBrowser
        Private components As IContainer
        Public Loaded As Boolean
    End Class
End Namespace

